

import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author Rune
 */

@ManagedBean(name="rb")
@SessionScoped
    
public class regBean implements Serializable{

    Beregninger b = new Beregninger();
    private double divisor = 0.0075;

    public Beregninger getB() {
        return b;
    }

    public void setB(Beregninger b) {
        this.b = b;
    }
    
    public double finnProsent() {
        return (b.og - b.fg) / divisor;
    }
    
    public double beregnCalAlk(){
        return 1;
    }
    
    public double beregnCalSugar(){
        return (b.fg);
    }
    
    public double beregnVol(){
        return b.h * b.r * b.r * Math.PI;
    }
}
